package com.yang.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @author YJH
 * @version 1.0
 * @className ConfigInfoProperties
 * @description 加载配置熟悉和指定前缀
 * @date 2020/4/2422:28
 */
@Component
/*@ConfigurationProperties(prefix = "cn.springcloud.book")*/
@Data
@RefreshScope
public class ConfigInfoProperties {

    /*配置文件*/
    @Value("${cn.springcloud.book.config}")
    private String config;

}
